<!doctype html>
<html lang="zh-Hans" dir="ltr" class="docs-wrapper docs-doc-page docs-version-current plugin-docs plugin-id-default docs-doc-id-middleware-sources/cloud-function">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="generator" content="Docusaurus v2.0.1">
<link rel="search" type="application/opensearchdescription+xml" title="Knife4j" href="/opensearch.xml">

<!-- Google Tag Manager -->
    <script>!function(e,t,a,n,g){e[n]=e[n]||[],e[n].push({"gtm.start":(new Date).getTime(),event:"gtm.js"});var m=t.getElementsByTagName(a)[0],r=t.createElement(a);r.async=!0,r.src="https://www.googletagmanager.com/gtm.js?id=GTM-TKBX678",m.parentNode.insertBefore(r,m)}(window,document,"script","dataLayer")</script>
    <!-- End Google Tag Manager -->
<script src="/js/custom.js"></script>
<script src="/js/baidu.js"></script>
<script src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1589206801610969" async crossorigin="anonymous"></script><title data-rh="true">3.2 功能介绍 | Knife4j</title><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://doc.xiaominfo.com/docs/middleware-sources/cloud-function"><meta data-rh="true" name="docusaurus_locale" content="zh-Hans"><meta data-rh="true" name="docsearch:language" content="zh-Hans"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="3.2 功能介绍 | Knife4j"><meta data-rh="true" name="description" content="Knife4jCloud V1.0版本目前提供的功能主要包括："><meta data-rh="true" property="og:description" content="Knife4jCloud V1.0版本目前提供的功能主要包括："><link data-rh="true" rel="icon" href="/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://doc.xiaominfo.com/docs/middleware-sources/cloud-function"><link data-rh="true" rel="alternate" href="https://doc.xiaominfo.com/docs/middleware-sources/cloud-function" hreflang="zh-Hans"><link data-rh="true" rel="alternate" href="https://doc.xiaominfo.com/docs/middleware-sources/cloud-function" hreflang="x-default"><link data-rh="true" rel="preconnect" href="https://3CRIMRK623-dsn.algolia.net" crossorigin="anonymous"><link rel="stylesheet" href="/assets/css/styles.66359a73.css">
<link rel="preload" href="/assets/js/runtime~main.e0db172c.js" as="script">
<link rel="preload" href="/assets/js/main.c059fb6e.js" as="script">
</head>
<body class="navigation-with-keyboard">
<script>!function(){function e(e){document.documentElement.setAttribute("data-theme",e)}var t=function(){var e=null;try{e=localStorage.getItem("theme")}catch(e){}return e}();null!==t?e(t):window.matchMedia("(prefers-color-scheme: dark)").matches?e("dark"):window.matchMedia("(prefers-color-scheme: light)").matches?e("light"):e("dark")}()</script><div id="__docusaurus">
<div role="region"><a href="#" class="skipToContent_fXgn">跳到主要内容</a></div><nav class="navbar navbar--fixed-top navbarHideable_m1mJ"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/knife4j-light.svg" alt="" class="themedImage_ToTc themedImage--light_HNdA"><img src="/img/knife4j-dark.svg" alt="" class="themedImage_ToTc themedImage--dark_i4oU"></div><b class="navbar__title text--truncate">Knife4j</b></a><a class="navbar__item navbar__link" href="/docs/quick-start">文档</a><a aria-current="page" class="navbar__item navbar__link changelog navbar__link--active" href="/docs/middleware-sources">中间件</a><a class="navbar__item navbar__link changelog" href="/docs/oas">OAS规范</a><a class="navbar__item navbar__link changelog" href="/docs/action">实战指南</a><a class="navbar__item navbar__link changelog" href="/docs/changelog">更新日志</a><a class="navbar__item navbar__link changelog" href="/docs/faq">FAQ</a><div class="navbar__item dropdown dropdown--hoverable"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">旧版本</a><ul class="dropdown__menu"><li><a class="dropdown__link" target="_blank" href="/v2/index.html">2.0.9</a></li></ul></div></div><div class="navbar__items navbar__items--right"><div class="toggle_MW0i colorModeToggle_x44X"><button class="clean-btn toggleButton_yw5v toggleButtonDisabled_BJd7" type="button" disabled="" title="切换浅色/暗黑模式（当前为暗黑模式）" aria-label="切换浅色/暗黑模式（当前为暗黑模式）"><span><svg viewBox="0 0 13 12" fill="none" xmlns="http://www.w3.org/2000/svg" width="14" height="14" class="lightToggleIcon_SFTY"><g clip-path="url(#clip0_833_8168)"><path d="M6.59998 8.49999C7.98069 8.49999 9.09998 7.3807 9.09998 5.99999C9.09998 4.61928 7.98069 3.49999 6.59998 3.49999C5.21926 3.49999 4.09998 4.61928 4.09998 5.99999C4.09998 7.3807 5.21926 8.49999 6.59998 8.49999Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M6.59985 0.5V1.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M6.59985 10.5V11.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M2.7099 2.11L3.4199 2.82" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9.77991 9.17999L10.4899 9.88999" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M1.09998 6H2.09998" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M11.0999 6H12.0999" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M2.7099 9.88999L3.4199 9.17999" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9.77991 2.82L10.4899 2.11" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></g><defs><clipPath id="clip0_833_8168"><rect width="12" height="12" fill="white" transform="translate(0.599976)"></rect></clipPath></defs></svg><svg viewBox="0 0 13 12" width="14" height="14" class="darkToggleIcon_ekgs"><path d="M10.7001 6.39501C10.6215 7.24611 10.3021 8.05721 9.77927 8.7334C9.25646 9.40959 8.55189 9.92291 7.748 10.2133C6.9441 10.5036 6.07414 10.5591 5.2399 10.3731C4.40565 10.187 3.64164 9.76728 3.03726 9.1629C2.43287 8.55851 2.01312 7.7945 1.8271 6.96026C1.64108 6.12602 1.6965 5.25605 1.98688 4.45216C2.27725 3.64826 2.79056 2.94369 3.46675 2.42088C4.14294 1.89808 4.95404 1.57866 5.80515 1.50001C5.30685 2.17414 5.06707 3.00473 5.12941 3.84071C5.19175 4.6767 5.55208 5.46254 6.14485 6.05531C6.73762 6.64808 7.52346 7.0084 8.35944 7.07074C9.19542 7.13308 10.026 6.8933 10.7001 6.39501Z" stroke="currentColor" fill="transparent" stroke-linecap="round" stroke-linejoin="round"></path></svg></span></button></div><a href="https://github.com/xiaoymin/swagger-bootstrap-ui" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link icon" title="View on GitHub">GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><div class="searchBox_ZlJk"><button type="button" class="DocSearch DocSearch-Button" aria-label="搜索"><span class="DocSearch-Button-Container"><svg width="20" height="20" class="DocSearch-Search-Icon" viewBox="0 0 20 20"><path d="M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="DocSearch-Button-Placeholder">搜索</span></span><span class="DocSearch-Button-Keys"></span></button></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper mainWrapper_z2l0 docsWrapper_BCFX"><button aria-label="回到顶部" class="clean-btn theme-back-to-top-button backToTopButton_sjWU" type="button"></button><div class="docPage__5DB"><main class="docMainContainer_gTbr docMainContainerEnhanced_Uz_u"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_z5aJ"><div class="docItemContainer_c0TR"><article><div class="tocCollapsible_ETCw theme-doc-toc-mobile tocMobile_ITEo"><button type="button" class="clean-btn tocCollapsibleButton_TO0P">本页总览</button></div><div class="theme-doc-markdown markdown"><h1>3.2 功能介绍</h1><p><code>Knife4jCloud</code> V1.0版本目前提供的功能主要包括：</p><ul><li>个人用户&amp;登录&amp;注册：通过邮箱的方式进行注册,数据完全隔离,每个人只能看到自己的数据</li><li>工作台：当前项目、服务的简单统计情况</li><li>项目管理：可以对项目进行编辑维护</li><li>服务管理：可以对服务列表进行编辑维护</li></ul><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="321-登录">3.2.1 登录<a class="hash-link" href="#321-登录" title="标题的直接链接">​</a></h2><p><code>Knife4jCloud</code>通过个人邮箱的方式进行登录注册,所以在系统数据是完全隔离的,每个人只能看到自己的数据</p><p><img loading="lazy" src="/assets/images/login1-50595f569c5c74b6fc46fbdfb36b39a8.png" width="841" height="581" class="img_ev3q"></p><p>注册界面：</p><p><img loading="lazy" src="/assets/images/login-4a8dc2af13fca62c2d3b6e8ba55d0212.png" width="841" height="581" class="img_ev3q"></p><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="322-工作台">3.2.2 工作台<a class="hash-link" href="#322-工作台" title="标题的直接链接">​</a></h2><p>在项目主页工作台,会显示当前用户的项目数量、服务数量、服务分类情况</p><p><img loading="lazy" src="/assets/images/workplan-1f8e48202e457421c0ab17c0cda42955.png" width="1162" height="503" class="img_ev3q"></p><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="323-项目管理">3.2.3 项目管理<a class="hash-link" href="#323-项目管理" title="标题的直接链接">​</a></h2><p>项目管理包含了对当前项目的新增、编辑、删除、查询等功能</p><p>项目主要包含的字段：项目编号、项目名称、项目描述</p><p>项目编号是全局唯一,并且只能是数字或英文或者是英文+数字+下划线等方式组成</p><p><img loading="lazy" src="/assets/images/product-aa07656f0194aba29a91edc6bd05edad.png" width="1362" height="623" class="img_ev3q"></p><p><img loading="lazy" src="/assets/images/product1-82bc5daf4cdc6ceb671377d97f124f87.png" width="1366" height="623" class="img_ev3q"></p><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="324-服务管理">3.2.4 服务管理<a class="hash-link" href="#324-服务管理" title="标题的直接链接">​</a></h2><p>服务在Knife4jCloud中的定义其实是一个OpenAPIv2的实例,一个服务可以是通过API接口获取的,也可以是通过Swagger的JSON来创建,所以在服务管理中,存在两种类型：</p><ul><li>API:微服务在线的方式,获取得到当前的OPenAPIv2的实例,通过Knife4j的Ui进行接口渲染</li><li>LOCAL:本地化的方式,使用者提供Swagger的JSON来创建服务实例</li></ul><p><img loading="lazy" src="/assets/images/item-d8f84aefc5aaa20a56020543b94dec5e.png" width="1365" height="639" class="img_ev3q"></p><p>通过在线API的方式来创建服务实例：</p><p><img loading="lazy" src="/assets/images/item1-61c7ecee29de693a21e6cb7aecf3fbd4.png" width="1363" height="627" class="img_ev3q"></p><p>通过本地LOCAL的方式创建</p><p><img loading="lazy" src="/assets/images/item2-886aea71dbd5a46ef93a34ddbe194565.png" width="1366" height="624" class="img_ev3q"></p><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="325-预览文档">3.2.5 预览文档<a class="hash-link" href="#325-预览文档" title="标题的直接链接">​</a></h2><p>通过项目管理列表中的操作按钮,可以选择预览文档查看文档</p><p><img loading="lazy" src="/assets/images/product2-862e04d8a2023c1a90229bd2681abc3d.png" width="1365" height="627" class="img_ev3q"></p><h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="326-个人中心">3.2.6 个人中心<a class="hash-link" href="#326-个人中心" title="标题的直接链接">​</a></h2><p>鼠标悬浮在右上角,可以选择用户信息、重置密码、退出等操作</p><p>其中用户信息中包含了开放注册API接口中的accessKey信息,如下图：</p><p><img loading="lazy" src="/assets/images/user1-07fb8745f16f583c5288cafb292dd8aa.png" width="1361" height="622" class="img_ev3q"></p></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"></div><div class="col lastUpdated_vwxv"><span class="theme-last-updated">最后<!-- -->由 <b>xiaoyumin</b> <!-- -->于 <b><time datetime="2022-08-14T10:05:39.000Z">2022年8月14日</time></b> <!-- -->更新</span></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="文档分页导航"></nav></div></div><div class="col col--3"><div class="tableOfContents_bqdL thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#321-登录" class="table-of-contents__link toc-highlight">3.2.1 登录</a></li><li><a href="#322-工作台" class="table-of-contents__link toc-highlight">3.2.2 工作台</a></li><li><a href="#323-项目管理" class="table-of-contents__link toc-highlight">3.2.3 项目管理</a></li><li><a href="#324-服务管理" class="table-of-contents__link toc-highlight">3.2.4 服务管理</a></li><li><a href="#325-预览文档" class="table-of-contents__link toc-highlight">3.2.5 预览文档</a></li><li><a href="#326-个人中心" class="table-of-contents__link toc-highlight">3.2.6 个人中心</a></li></ul></div></div></div></div></main></div></div><footer class="footer"><div class="container container-fluid"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">文档指南</div><ul class="footer__items clean-list"><li class="footer__item"><a class="footer__link-item" href="/docs/quick-start">文档</a></li><li class="footer__item"><a class="footer__link-item" href="/docs/community/simple-demo">示例</a></li><li class="footer__item"><a class="footer__link-item" href="/docs/changelog">更新日志</a></li><li class="footer__item"><a class="footer__link-item" href="/docs/upgrading/upgrading-to-v4">升级到v4.0</a></li></ul></div><div class="col footer__col"><div class="footer__title">社区</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://gitter.im/knife4j/knife4j" target="_blank" rel="noopener noreferrer" class="footer__link-item">Gitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://www.oschina.net/question/tag/swagger-bootstrap-ui" target="_blank" rel="noopener noreferrer" class="footer__link-item">开源中国<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div><div class="col footer__col"><div class="footer__title">关注公众号</div><ul class="footer__items clean-list"><li class="footer__item"><img src="/images/website/qrcode.jpg" width="150"></li></ul></div><div class="col footer__col"><div class="footer__title">更多</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://docusaurus.io" target="_blank" rel="noopener noreferrer" class="footer__link-item">Docusaurus<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://gitee.com/xiaoym/knife4j" target="_blank" rel="noopener noreferrer" class="footer__link-item">Gitee<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://github.com/xiaoymin/swagger-bootstrap-ui" target="_blank" rel="noopener noreferrer" class="footer__link-item">GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Apache License 2.0 | Copyright © 2018-2023-八一菜刀 浙ICP备18027673号-1 </div></div></div></footer></div>
<script src="/assets/js/runtime~main.e0db172c.js"></script>
<script src="/assets/js/main.c059fb6e.js"></script>
<!-- Google Tag Manager (noscript) -->
    <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-TKBX678" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
    <!-- End Google Tag Manager (noscript) --></body>
</html>